package com.eastedu.model;

import lombok.Data;

import java.util.Objects;

/**
 * The type Request parameter.
 *
 * @author superman
 */
@Data
public class RequestParameter {
    private Long lastCount;
    private Boolean async;

    /**
     * Gets last count.
     *
     * @return the last count
     */
    public Long getLastCount() {
        if (Objects.isNull(lastCount)) {
            this.lastCount = 0L;
        }

        return lastCount;
    }

    /**
     * Gets async.
     *
     * @return the async
     */
    public Boolean getAsync() {
        if (Objects.isNull(async)) {
            this.async = true;
        }
        return async;
    }
}
